home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.10
/
demo
/
sparx.i
/
.spark04.i
< prev
next >
Wrap
Text File
|
1995-04-19
|
1KB
|
58 lines
Procedure Spark04;
Const
max4lines = 80;
Type
Sp1lines = Array[1..max4lines] of line;
Sp1LinesPtr = ^Sp1Lines;
Var
arr : Sp1LinesPtr;
cnt1 : Short;
cnt2 : Short;
CCNT : Short;
add1 : Short;
add2 : Short;
actualline : Short;
Begin
New(arr);
ActualLine := 1;
cnt1 := 246; { sin }
cnt2 := 3; { cos }
CCNT := 1; { color }
add1 := 3; { f. cnt1 }
add2 := 7; { f. cnt2 }
Repeat
EraseLine( Adr(arr^[actualline]) );
With arr^[actualline] do begin
x1 := 160 + XSin^[cnt1] * 4 DIV 5; { +- max. 80 }
y1 := 120 + Xcos^[cnt1+30] * 3 DIV 5; { +- max. 60 }
x2 := 160 + XSin^[cnt2] * 8 DIV 5; { +- max.160 }
y2 := 120 + Xcos^[cnt2+35] * 6 DIV 5; { +- max.120 }
end;
cnt1 := cnt1 + add1;
if cnt1>627 then cnt1:= cnt1-628;
cnt2 := cnt2 + add2;
if cnt2>627 then cnt2:= cnt2-628;
DrawLine( Adr(arr^[actualline]), cnt2 );
inc( CCNT );
If CCNT > maxColors then CCNT := 2;
inc( actualline );
If actualline >= max4lines then actualline := 1;
Until LeftMouseButton;
Ciao;
Dispose(arr);
SetSColors( Adr(Def_Colors) );
End;